<div>
    <table cellpadding="0" cellspacing="0" border="0" class="display dataTable" id="" active_url="">
        <thead>
            <tr>
                <th class="ui-state-default"><?php print lang('vt_stt'); ?></th>
                <th class="ui-state-default"><?php print lang('vt_mavt'); ?></th>
                <th class="ui-state-default"><?php print lang('vt_tenvt'); ?></th>
                <th class="ui-state-default"><?php print lang('vt_donvitinh'); ?></th>
                <th class="ui-state-default"><?php print lang('vt_soluongton'); ?></th>
                <th class="ui-state-default"><?php print lang('vt_dongia'); ?></th>
                <th class="ui-state-default"><?php print lang('vt_thanhtien'); ?></th>
            </tr>
        </thead>
        <tbody>
            <?php $count_price = 0; $i = 1; ?>
            <?php foreach($products As $row): ?>
            <tr class="<?php print ( $i%2 == 0 ) ? 'even':'odd'; ?>">
                <td><?php print $i; ?></td>
                <td><?php print $row->code; ?></td>
                <td><?php print $row->name; ?></td>
                <td><?php print $row->val_name; ?></td>
                <td><?php print decimal_format($row->total); ?></td>
                <td><?php print formatMoney(decimal_format($row->price)); ?></td>
                <td><?php print formatMoney(decimal_format($row->price*$row->total)); ?></td>
            </tr>
            <?php
                $count_price += $row->price*$row->total;
                $i++;
            ?>
            <?php endforeach; ?>
        </tbody>
        <tfoot>
            <tr>
                <th align="right" colspan="6" class="ui-state-default"><?php print lang('vt_total-vat'); ?></th>
                <th align="left" class="ui-state-default"><?php print formatMoney(decimal_format($count_price)); ?></th>
            </tr>
        </tfoot>
    </table>
</div>